package IO;

import java.io.File;
import java.io.IOException;

public class Demo1 {
    public static void main(String[] args) throws IOException {
        //创建D盘文件
        //File f =  new File("d:/test.txt");   //绝对路径
        File f =  new File("./test.txt");   //相对路径
        System.out.println(f.getParent());
        System.out.println(f.getName());
        System.out.println(f.getPath());
        System.out.println(f.getAbsolutePath());
        System.out.println(f.getCanonicalPath());
     



    }
}
